﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
					xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

	<!-- Style for textbox validation -->
	<Style TargetType="{x:Type TextBox}">
		<Setter Property="Validation.ErrorTemplate">
			<Setter.Value>
				<ControlTemplate>
					<DockPanel LastChildFill="True">
						<TextBlock DockPanel.Dock="Right" 
						Foreground="Orange"
						FontSize="12pt">
						•
						</TextBlock>
						<Border BorderBrush="Red" BorderThickness="1">
							<AdornedElementPlaceholder />
						</Border>
					</DockPanel>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Style.Triggers>
			<Trigger Property="Validation.HasError" Value="true">
				<Setter Property="ToolTip"
				Value="{Binding RelativeSource={RelativeSource Self}, 
					   Path=(Validation.Errors)[0].ErrorContent}"/>
			</Trigger>
		</Style.Triggers>
	</Style>    
</ResourceDictionary>